-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix + Add test for exporting location types with changed names #12671
Conversation
(Standard links)
|
test this please |
cv api LocationType.create name="SignificantOther" display_name="Significant Other"
echo '{"contact_type":"Individual", "first_name":"Foo", "last_name":"Bar", "api.Email.create": [' $(for ltype in {1..6}; do printf '%s' ', {"location_type_id":"' $ltype '", "email":"location_type_' $ltype '@i.oo"}'; done | cut -c3-;) '] }' | cv api --in=json Contact.create
echo '{"name":"locationtypetest","mapping_type_id":"7","api.MappingField.create":[{"name":"email","contact_type":"Individual","column_number":"0","location_type_id":"1","grouping":"1"},{"name":"email","contact_type":"Individual","column_number":"1","location_type_id":"2","grouping":"1"},{"name":"email","contact_type":"Individual","column_number":"2","location_type_id":"3","grouping":"1"},{"name":"email","contact_type":"Individual","column_number":"3","location_type_id":"4","grouping":"1"},{"name":"email","contact_type":"Individual","column_number":"4","location_type_id":"5","grouping":"1"},{"name":"email","contact_type":"Individual","column_number":"5","location_type_id":"6","grouping":"1"}]}' | cv api --in=json Mapping.create Then exported the contact "Foo Bar" from search results, using mapping "locationtypetest" |
That's a nice review, @highfalutin! Thanks @eileenmcnaughton and @highfalutin. |
I also did an extra iteration of |
Late to the party, but confirming that it is fixed for my use-cases as well, including for multi-lingual. Thank you! |
Overview
FIxes a bug whereby export does not export locations with name fields that differ from their labels & a recent extension of this bug to affect names that do match but have spaces.
Before
Add a location type "Expédition", where name = expedition and display_name = expédition.
Go to the member dashboard, click to list all active members
Edit one of the contacts, so that they have an address of type "expédition"
Back in the search results, export all results
Select a custom mapping:
Display name
City, location type = Expédition
Result: the city is empty (for that contact that was edited).
After
City exports correctly
Technical Details
This has affected exports for a long time but from 5.3 also affects names that match with spaces in them (which is also covered in the test). Hence targetting the rc & considering a 5.4 port
Comments
@mlutfy